#include <stdio.h>
#include <assert.h>


int my_strlen(const char* str)
{
	assert(str != NULL);
	int count = 0;
	while (*str!='\0')
	{
		str++;
		count++;
	}
	return count;
}

char* my_strcpy(char* dest, const char* sorce)
{
	assert(dest != NULL);
	assert(sorce != NULL);
	char* ret = dest;
	while (*dest++ = *sorce++)
	{

	}
	return ret;
}

int main()
{
	char* str = "hello world!";
	int len = my_strlen(str);
	printf("len=%d\n", len);
	char arr[50] = {0};
	printf("%s\n", my_strcpy(arr, str));
}